import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/views/login/index.vue'

Vue.use(Router)

export default new Router({
	mode: 'hash',
	base: process.env.BASE_URL,
	routes: [
		{
			path: '/',
			name: 'Home',
			meta: { tabbar: true },
			component: () => import(/* webpackChunkName: "Home" */ './views/home/index.vue')
		},
		{
			path: '/search',
			name: 'Search',
			component: () => import(/* webpackChunkName: "Home" */ './views/search/index.vue'),
			meta: { keepAlive: false },
		},
		{
			path: '/item/:id',
			name: 'productDetail',
			component: () => import(/* webpackChunkName: "productDetail" */ './views/productDetail/index.vue'),
			meta: { keepAlive: false },
		},
		{
			path: '/category',
			name: 'Category',
			meta: { tabbar: true },
			component: () => import(/* webpackChunkName: "Home" */ './views/category/index.vue')
		},
		{
			path: '/chart',
			name: 'Chart',
			meta: { tabbar: true },
			component: () => import(/* webpackChunkName: "Chart" */ './views/chart/index.vue')
		},
		{
			path: '/account',
			name: 'Account',
			meta: { tabbar: true },
			component: () => import(/* webpackChunkName: "Account" */ './views/account/index.vue')
		},
		{
			path: '/follow',
			name: 'Follow',
			component: () => import(/* webpackChunkName: "Follow" */ './views/follow/index.vue')
		},
		{
			path: '/collect',
			name: 'Collect',
			component: () => import(/* webpackChunkName: "Collect" */ './views/collect/index.vue')
		},
		{
			path: '/myXzProduct',
			name: 'MyXzProduct',
			component: () => import(/* webpackChunkName: "Account" */ './views/myXzProduct/index.vue')
		},
		{
			path: '/point',
			name: 'Point',
			component: () => import(/* webpackChunkName: "Point" */ './views/point/index.vue')
		},
		{
			path: '/shipping',
			name: 'Shipping',
			component: () => import(/* webpackChunkName: "Shipping" */ './views/shipping/index.vue')
		},
		{
			path: '/about',
			name: 'About',
			component: () => import(/* webpackChunkName: "About" */ './views/about/index.vue')
		},
		{
			path: '/xzProductCreate',
			name: 'xzProductCreate',
			component: () => import(/* webpackChunkName: "xzProductCreate" */ './views/xzProductCreate/index.vue')
		},
		{
			path: '/Login',
			name: 'Login',
			component: Login
		},
		{
			path: '*',
			name: '404',
			component: () => import(/* webpackChunkName: "404" */ './views/404/index.vue')
		}
	]
})
